<?php
/**
 * Created by : PhpStorm
 * User: ZPF
 * Date: 2022/3/30
 * Time: 22:58
 */

namespace app\admin\controller;


use app\admin\model\OtherModel;
use app\BaseController;
use think\App;

class Other extends BaseController
{

    // protected $middleware=['CheckToken'];
    /**
     * 网站配置
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function list()
    {
        $where=[];
        $list=OtherModel::getList($where);
        api_return(200,'success',['list'=>$list]);
    }
    /*三方配置保存*/
    public function save(){
        if(request()->isPost()){
            $p = request()->post();
            $other = new OtherModel;
            $other->saveAll($p);
//            ll($p);die;
        }
        api_return(200,'保存成功');
    }

}
